package 第四章作业;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;
import javax.servlet.ServletException;
import java.util.Arrays;
import java.io.IOException;
@WebServlet("/Step01")
public class Step01 extends HttpServlet {
    @Override
    protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
        this.doPost(req,resp);
    }
    @Override
    protected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
        String[] book = req.getParameterValues("book");
        HttpSession session = req.getSession();
        session.setAttribute("book",book);
        resp.sendRedirect("address.jsp");
    }
}